Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reserved_words counter #168

Merged
merged 4 commits into from
May 16, 2024
Merged

Add reserved_words counter #168

merged 4 commits into from
May 16, 2024

Conversation

theevocater
Copy link
Contributor

We've run into an issue internally where certain applications are emitting stats with reserved words. We don't want to panic or otherwise harm the app, but we do want to be able to alert / notify owners when this is happening.

We create an additional counter here to track how often reserved_tags are being sent to statsd without blocking them.

We've run into an issue internally where certain applications are
emitting stats with reserved words. We don't want to panic or otherwise
harm the app, but we do want to be able to alert / notify owners when
this is happening.
var ReservedTagWords = map[string]bool{"asg": true, "az": true, "backend": true, "canary": true, "host": true, "period": true, "region": true, "shard": true, "window": true, "source": true, "project": true, "facet": true, "envoyservice": true}

func (s *statStore) validateTags(tags map[string]string) {
for k := range tags {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which one is usually smaller in number of elements, reserved tags or user tags?

Copy link
Contributor Author

@theevocater theevocater May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gooood question, i'd have to assume user tags. most of our tags get added in the enrichment pipeline

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and its nil for anything created with the non xWithTags paths

@theevocater theevocater merged commit 49e70f1 into master May 16, 2024
3 checks passed
@theevocater theevocater deleted the jakeman/reservedtags branch May 16, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants